<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

/* @var $this yii\web\View */
/* @var $model app\models\Client */

$this->title = $model->client_id;
$this->params['breadcrumbs'][] = ['label' => 'Clients', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="client-view">

    <p>
        <?= Html::a('Update', ['update', 'id' => $model->client_id], ['class' => 'btn btn-primary']) ?>
        <?= Html::a('Delete', ['delete', 'id' => $model->client_id], [
            'class' => 'btn btn-danger',
            'data' => [
                'confirm' => '确定执行删除操作?',
                'method' => 'post',
            ],
        ]) ?>
    </p>

    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
            'client_id',
            'client_name',
            'client_password',
            'client_appkey',
            [
                'attribute' => 'add_time',
                'value' => function($data){
                    return $data->add_time ==0 ? 0 : date('Y-m-d',$data->add_time);
                }
            ],
            'is_active',
            'created_time',
            'qqnumber',
            'lastlogintime',
            [
                'attribute' => 'begindate',
                'value' => function($data){
                    return $data->begindate ==0 ? 0 : date('Y-m-d',$data->begindate);
                }
            ],
            [
                'attribute' => 'enddate',
                'value' => function($data){
                    return $data->enddate ==0 ? 0 : date('Y-m-d',$data->enddate);
                }
            ],
        ],
    ]) ?>

</div>
